<style type="text/css">
    .aui-list-item.icon-select .aui-list-item-title{color: #d34125;}
</style>
<ul class="aui-list aui-list-in" id="{$field_name}">
    <li class="aui-list-item list-item- {$field_name}-item {'' == $field_value ? 'icon-select' : ''}" data-value="">
        <div class="aui-list-item-inner">
            <div class="aui-list-item-title">请选择{$show_name}</div>
        </div>
    </li>
    {volist name="_category_list" id="rs"}
    <li class="aui-list-item list-item-{$rs['category_id']} {$field_name}-item {$rs['category_id'] == $field_value ? 'icon-select' : ''}" data-value="{$rs['category_id']}">
        <div class="aui-list-item-inner">
            <div class="aui-list-item-title">{$rs['title']}</div>
        </div>
    </li>
    {/volist}
</ul>
<script type="text/javascript">
    $(document).ready(function(){
        var field_name      = "{$field_name}";
        var field_name_item = ".{$field_name}-item";
        var field_value     = $("input[name='"+ field_name +"']").val();
        $(".list-item-" + field_value).addClass('icon-select');

        $(field_name_item).click(function(){
            $(field_name_item).removeClass('icon-select');
            $(this).addClass('icon-select');

            // 改变id及名称
            $("input[name='"+ field_name +"']").val($(this).attr('data-value'));
            $("." + field_name + "-btn").text($(this).find('.aui-list-item-title').text());

            // 触发关闭窗口
            // $(".box-close").trigger('click');
            $.winRemove();

        });
    });
</script>